package model

import (
	"newRetailByGolang/variable"
	"time"
)

type Store struct {
	Id int64
	Name string
	UserId int64
	UserName string ;
	SuperiorAgencyId int64 ;
	CreatedAt time.Time
	UpdatedAt time.Time
}

func (store *Store) FindStoreByAgentId(agentId int64) *Store {
	var s Store
	variable.Db.Where("superior_agency_id = ?", agentId).First(&s)
	return &s
}
